home *** CD-ROM | disk | FTP | other *** search
/ Delphi 2.0 - Programmer's Utilities Power Pack / Delphi 2.0 Programmer's Utilities Power Pack.iso / m_to_r / qrep096 / labelrep.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1996-09-15  |  1.5 KB  |  61 lines

  1. unit Labelrep;
  2.  
  3. interface
  4.  
  5. uses
  6.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, Forms, Dialogs,
  7.   StdCtrls, Quickrep, ExtCtrls, DB, DBTables;
  8.  
  9. type
  10.   TLabelForm = class(TForm)
  11.     Table1: TTable;
  12.     DataSource1: TDataSource;
  13.     Rep: TQuickReport;
  14.     QRBand1: TQRBand;
  15.     QRDBText1: TQRDBText;
  16.     QRDBText2: TQRDBText;
  17.     Table1CustNo: TFloatField;
  18.     Table1Company: TStringField;
  19.     Table1Addr1: TStringField;
  20.     Table1Addr2: TStringField;
  21.     Table1City: TStringField;
  22.     Table1State: TStringField;
  23.     Table1Zip: TStringField;
  24.     Table1Country: TStringField;
  25.     Table1Phone: TStringField;
  26.     Table1FAX: TStringField;
  27.     Table1TaxRate: TFloatField;
  28.     Table1Contact: TStringField;
  29.     Table1LastInvoiceDate: TDateTimeField;
  30.     QRDBText4: TQRDBText;
  31.     QRBand2: TQRBand;
  32.     QRLabel1: TQRLabel;
  33.     Table1AdrLine3: TStringField;
  34.     Table1AdrLine4: TStringField;
  35.     QRDBText3: TQRDBText;
  36.     QRSysData1: TQRSysData;
  37.     procedure Table1CalcFields(DataSet: TDataSet);
  38.   private
  39.     { Private declarations }
  40.   public
  41.     { Public declarations }
  42.   end;
  43.  
  44. var
  45.   LabelForm: TLabelForm;
  46.  
  47. implementation
  48.  
  49. {$R *.DFM}
  50.  
  51. procedure TLabelForm.Table1CalcFields(DataSet: TDataSet);
  52. begin
  53.    Table1AdrLine3.Value:=Table1City.Value+' '+Table1Zip.Value+' '+Table1State.Value;
  54.    if Table1Addr2.Value<>'' then begin
  55.       Table1AdrLine4.Value:=Table1AdrLine3.Value;
  56.       Table1AdrLine3.Value:=Table1Addr2.value;
  57.    end;
  58. end;
  59.  
  60. end.
  61.